package jin.chen.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import jin.chen.pojo.bo.ShopCatBo;
import jin.chen.utils.Result;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Api(value = "购物车", tags = "购物车接口controller")
@RequestMapping("/shopcart")
public class ShopCatController {

    @ApiOperation(value = "加入购物车接口", notes = "加入购物车接口", httpMethod = "POST")
    @PostMapping("/add")
    public Result add(@ApiParam(name = "userId", value = "用户id", required = true) @RequestParam String userId,
                      @ApiParam(name = "shopCatBo", value = "前端购物车业务bo", required = true) @RequestBody ShopCatBo shopCatBo,
                      HttpServletRequest request, HttpServletResponse response){
        if(StringUtils.isBlank(userId)){
            return Result.errorMsg("");
        }
        return Result.OK();
    }
}
